<?php 
/**
 * Tutorial-View: `view`
 *
 * PHP versions 4 and 5
 *
 * TutoriumBase (http://tutoriumbase.my-reality.de)
 * Copyright 2012, Miguel Gonzalez (http://my-reality.de)
 *
 *
 * @copyright     Copyright 2012, Miguel Gonzalez (http://my-reality.de)
 * @link          http://tutoriumbase.my-reality.de TutoriumBase
 * @since         TutoriumBase v 0.1
 */
echo '<div class="box">';

if (isset($caption)) {
  echo $this->Layout->generateMainCaption($caption);
}

echo '<div id="tutorial_header">';
echo '<div class="left">' . $this->Layout->generateShortTutorialInfo($chapter) . '</div>';
echo '<div class="right"><div class="caption_main">' . $tutorial['Tutorial']['caption'] . '</div>';
echo '<div class="caption_small">';
if (count($tutorial['Chapter']) > 1)
{
    echo 'Teil ' . $chapter['Chapter']['inner_order'] . ': ';
}

echo $chapter['Chapter']['caption'] . '</div>';

echo '</div></div><div class="tutorial_content">';
echo $chapter['Chapter']['content'];
echo '</div>';

if (count($tutorial['Chapter']) > 1) 
{
    echo $this->Layout->generateChapterBar($tutorial['Chapter'], $this->Session->read('Auth.User.id') == $tutorial['User']['id'], $chapter['Chapter']['inner_order']);
}
echo '</div>';

?>